package data;

public class Token 
{
	private TipoToken _tt;
	private String _content;
	
	/**
	 * Constructor
	 * @param tt
	 * @param content
	 */
	public Token(TipoToken tt, String content)
	{
		_tt = tt;
		_content = content;
	}
	
	/**
	 * getContent
	 * @return token str value
	 */
	public String getContent()
	{
		return _content;
	}
	
	/**
	 * getType
	 * @return token type
	 */
	public TipoToken getType()
	{
		return _tt;
	}
	
	/**
	 * getStrType
	 * @return token type str value
	 */
	public String getStrType()
	{
		return TipoToken.strTokenType(_tt);
	}
	
	/**
	 * setType
	 * @param tt TokenType
	 */
	public void setType(TipoToken tt)
	{
		_tt = tt;
	}
	
	/**
	 * setContent
	 * @param content str value
	 */
	public void setContent(String content)
	{
		_content = content;
	}
	
	/**
	 * toString
	 * @return representacion en string del token
	 */
	@Override
	public String toString()
	{
		return "{" + getStrType() + ": " + getContent() + "}";
	}
}
